home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Software Contest 3 / FM Towns Software Contest 3.iso / exp / video_t / no1 / c_sorse / tiff.c < prev    next >
C/C++ Source or Header  |  1994-01-07  |  9KB  |  407 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    Dialog_tiff ;
  9. extern int    DButton_tiff ;
  10. extern int    tiff_on() ;
  11. extern int    DButton_009f ;
  12. extern int    tiff_kaku() ;
  13. extern int    DButton_00a1 ;
  14. extern int    tiff_off() ;
  15. extern int    _001Message_00a5 ;
  16. extern int    _002Message_00a5 ;
  17. extern int    Message_00a5 ;
  18. extern int    Message_00a3 ;
  19. extern int    _001Message_00a3 ;
  20. extern int    TIcon_tiff[2] ;
  21. extern int    tiff_check() ;
  22. extern int    _002Message_00a3 ;
  23. extern int    _003Message_00a3 ;
  24. extern int    Text_009b ;
  25. extern int    DButton_00aa ;
  26. extern int    tiff_past() ;
  27. extern int    _001DButton_00aa ;
  28. extern int    tiff_del() ;
  29. extern int    _002DButton_00aa ;
  30. extern int    tiff_copy() ;
  31. extern int    Message_00bd ;
  32. extern int    _001Message_00bd ;
  33. extern int    _002Message_00bd ;
  34. extern int    DButton_00c3 ;
  35. extern int    tiff_fail() ;
  36. extern int    Message_00c5 ;
  37.  
  38. #define ALIGN    4
  39. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  40.  
  41. /*    MMI_init 用データ    */
  42.  
  43. /*    ヘッダ    */
  44.  
  45. MMIINIT    initDataTIFF = { "MmiInit",  22, 0 } ;
  46.  
  47. /* Dialog_tiff */
  48.  
  49. static MMIPACKET d001 = {    &Dialog_tiff,
  50.                             NULL,
  51.                             &MJ_DIALOGL40,
  52.                             OFFSET(DIALOGL40),
  53.                             0
  54.                         } ;
  55. static DIALOGL40    d001d = {    MS_BTLEFTL40 | MS_EVMOSONL40,
  56.                                9,  25, 497, 332, 0, 7,15,
  57.                             MS_PANELL40 | MS_BFRAMEL40 | MS_FRAMEL40,
  58.                             NULL,   0,   0
  59.                         } ;
  60.  
  61. /* DButton_tiff */
  62.  
  63. static MMIPACKET d002 = {    &DButton_tiff,
  64.                             &Dialog_tiff,
  65.                             &MJ_DBUTTONL40,
  66.                             OFFSET(DBUTTONL40),
  67.                             0
  68.                         } ;
  69. static DBUTTONL40    d002d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  70.                               38, 296, 117, 321, 0, 7, 0,
  71.                             MS_UFRAMEL40 | MS_FRAMEL40 | MS_DEFAULTL40,
  72.                             tiff_on,
  73.                             0x0000
  74.                         } ;
  75.  
  76. /* DButton_009f */
  77.  
  78. static MMIPACKET d003 = {    &DButton_009f,
  79.                             &Dialog_tiff,
  80.                             &MJ_DBUTTONL40,
  81.                             OFFSET(DBUTTONL40),
  82.                             0
  83.                         } ;
  84. static DBUTTONL40    d003d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  85.                              161, 297, 350, 322, 0, 7, 0,
  86.                             MS_UFRAMEL40 | MS_FRAMEL40,
  87.                             tiff_kaku,
  88.                             0x0000
  89.                         } ;
  90.  
  91. /* DButton_00a1 */
  92.  
  93. static MMIPACKET d004 = {    &DButton_00a1,
  94.                             &Dialog_tiff,
  95.                             &MJ_DBUTTONL40,
  96.                             OFFSET(DBUTTONL40),
  97.                             0
  98.                         } ;
  99. static DBUTTONL40    d004d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  100.                              390, 297, 469, 322, 0, 7, 0,
  101.                             MS_UFRAMEL40 | MS_FRAMEL40,
  102.                             tiff_off,
  103.                             0x0000
  104.                         } ;
  105.  
  106. /* _001Message_00a5 */
  107.  
  108. static MMIPACKET d005 = {    &_001Message_00a5,
  109.                             &Dialog_tiff,
  110.                             &MJ_MSGL40,
  111.                             OFFSET(MSGL40),
  112.                             0
  113.                         } ;
  114. static MSGL40    d005d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  115.                               39, 298, 119, 321, 0,15,15,
  116.                             MS_NONEL40,
  117.                             "確定",
  118.                                2,  16,  16,
  119.                             MS_NONEL40,
  120.                               16,   0
  121.                         } ;
  122.  
  123. /* _002Message_00a5 */
  124.  
  125. static MMIPACKET d006 = {    &_002Message_00a5,
  126.                             &Dialog_tiff,
  127.                             &MJ_MSGL40,
  128.                             OFFSET(MSGL40),
  129.                             0
  130.                         } ;
  131. static MSGL40    d006d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  132.                              390, 298, 470, 322, 0,15,15,
  133.                             MS_NONEL40,
  134.                             "取消",
  135.                                2,  16,  16,
  136.                             MS_NONEL40,
  137.                               16,   0
  138.                         } ;
  139.  
  140. /* Message_00a5 */
  141.  
  142. static MMIPACKET d007 = {    &Message_00a5,
  143.                             &Dialog_tiff,
  144.                             &MJ_MSGL40,
  145.                             OFFSET(MSGL40),
  146.                             0
  147.                         } ;
  148. static MSGL40    d007d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  149.                              169, 298, 344, 321, 0,15,15,
  150.                             MS_NONEL40,
  151.                             "画像データの位置指定",
  152.                                2,  16,  16,
  153.                             MS_NONEL40,
  154.                                0,   0
  155.                         } ;
  156.  
  157. /* Message_00a3 */
  158.  
  159. static MMIPACKET d008 = {    &Message_00a3,
  160.                             &Dialog_tiff,
  161.                             &MJ_MSGL40,
  162.                             OFFSET(MSGL40),
  163.                             0
  164.                         } ;
  165. static MSGL40    d008d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  166.                               26,  41, 486,  64, 0,15,12,
  167.                             MS_NONEL40,
  168.                             "画像データ表示関連",
  169.                                2,  16,  16,
  170.                             MS_NONEL40,
  171.                               10,   0
  172.                         } ;
  173.  
  174. /* _001Message_00a3 */
  175.  
  176. static MMIPACKET d009 = {    &_001Message_00a3,
  177.                             &Dialog_tiff,
  178.                             &MJ_MSGL40,
  179.                             OFFSET(MSGL40),
  180.                             0
  181.                         } ;
  182. static MSGL40    d009d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  183.                               47,  82, 245, 105, 0,15, 0,
  184.                             MS_NONEL40,
  185.                             "320*240の32000色モード",
  186.                                2,  16,  16,
  187.                             MS_NONEL40,
  188.                                1,   0
  189.                         } ;
  190.  
  191. /* TIcon_tiff[0] */
  192.  
  193. static MMIPACKET d010 = {    &TIcon_tiff[0],
  194.                             &Dialog_tiff,
  195.                             &MJ_TICONL40,
  196.                             OFFSET(TICONL40),
  197.                             0
  198.                         } ;
  199. static TICONL40    d010d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40 | MS_LEFTL40,
  200.                               28,  84,  45, 103, 0, 7, 0,
  201.                             MS_UFRAMEL40 | MS_FRAMEL40,
  202.                             tiff_check,
  203.                             0x0000, 259, 260
  204.                         } ;
  205.  
  206. /* TIcon_tiff[1] */
  207.  
  208. static MMIPACKET d011 = {    &TIcon_tiff[1],
  209.                             &Dialog_tiff,
  210.                             &MJ_TICONL40,
  211.                             OFFSET(TICONL40),
  212.                             0
  213.                         } ;
  214. static TICONL40    d011d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40 | MS_LEFTL40,
  215.                              263,  84, 280, 103, 0, 7, 0,
  216.                             MS_UFRAMEL40 | MS_FRAMEL40,
  217.                             tiff_check,
  218.                             0x0000, 259, 260
  219.                         } ;
  220.  
  221. /* _002Message_00a3 */
  222.  
  223. static MMIPACKET d012 = {    &_002Message_00a3,
  224.                             &Dialog_tiff,
  225.                             &MJ_MSGL40,
  226.                             OFFSET(MSGL40),
  227.                             0
  228.                         } ;
  229. static MSGL40    d012d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  230.                              282,  82, 482, 105, 0,15, 0,
  231.                             MS_NONEL40,
  232.                             "512*480の32000色モード",
  233.                                2,  16,  16,
  234.                             MS_NONEL40,
  235.                                1,   0
  236.                         } ;
  237.  
  238. /* _003Message_00a3 */
  239.  
  240. static MMIPACKET d013 = {    &_003Message_00a3,
  241.                             &Dialog_tiff,
  242.                             &MJ_MSGL40,
  243.                             OFFSET(MSGL40),
  244.                             0
  245.                         } ;
  246. static MSGL40    d013d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  247.                              125, 115, 399, 138, 0,15,14,
  248.                             MS_NONEL40,
  249.                             "他の画面モードは自動的に切り換えられます",
  250.                                1,  12,  12,
  251.                             MS_NONEL40,
  252.                                1,   0
  253.                         } ;
  254.  
  255. /* Text_009b */
  256.  
  257. static MMIPACKET d014 = {    &Text_009b,
  258.                             &Dialog_tiff,
  259.                             &MJ_TEXTL40,
  260.                             OFFSET(TEXTL40),
  261.                             0
  262.                         } ;
  263. static TEXTL40    d014d =     {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_EVKEYONL40,
  264.                               16, 181, 490, 286, 0, 7, 0,
  265.                             MS_DFRAMEL40 | MS_FRAMEL40,
  266.                             0,
  267.                                0,   0,   0,   0,
  268.                                0,   0,   0,   0,   0,
  269.                                   -1,   0,   0,
  270.                                0,   0,   0,   0,
  271.                                0,
  272.                                0,   0,   0,   0,
  273.                                1,  12,  12,   0,   0,
  274.                                0,   0,   0,   0,   0,   0,   0,
  275.                                0,   0,   0,   0,
  276.                                4
  277.                         } ;
  278.  
  279. /* DButton_00aa */
  280.  
  281. static MMIPACKET d015 = {    &DButton_00aa,
  282.                             &Dialog_tiff,
  283.                             &MJ_DBUTTONL40,
  284.                             OFFSET(DBUTTONL40),
  285.                             0
  286.                         } ;
  287. static DBUTTONL40    d015d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  288.                              175, 155, 233, 176, 0, 7, 0,
  289.                             MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  290.                             tiff_past,
  291.                             0x0000
  292.                         } ;
  293.  
  294. /* _001DButton_00aa */
  295.  
  296. static MMIPACKET d016 = {    &_001DButton_00aa,
  297.                             &Dialog_tiff,
  298.                             &MJ_DBUTTONL40,
  299.                             OFFSET(DBUTTONL40),
  300.                             0
  301.                         } ;
  302. static DBUTTONL40    d016d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  303.                              241, 155, 297, 176, 0, 7, 0,
  304.                             MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  305.                             tiff_del,
  306.                             0x0000
  307.                         } ;
  308.  
  309. /* _002DButton_00aa */
  310.  
  311. static MMIPACKET d017 = {    &_002DButton_00aa,
  312.                             &Dialog_tiff,
  313.                             &MJ_DBUTTONL40,
  314.                             OFFSET(DBUTTONL40),
  315.                             0
  316.                         } ;
  317. static DBUTTONL40    d017d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  318.                              305, 155, 363, 176, 0, 7, 0,
  319.                             MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  320.                             tiff_copy,
  321.                             0x0000
  322.                         } ;
  323.  
  324. /* Message_00bd */
  325.  
  326. static MMIPACKET d018 = {    &Message_00bd,
  327.                             &Dialog_tiff,
  328.                             &MJ_MSGL40,
  329.                             OFFSET(MSGL40),
  330.                             0
  331.                         } ;
  332. static MSGL40    d018d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  333.                              181, 158, 230, 173, 0,15, 0,
  334.                             MS_NONEL40,
  335.                             "挿入",
  336.                                1,  12,  12,
  337.                             MS_NONEL40,
  338.                               12,   0
  339.                         } ;
  340.  
  341. /* _001Message_00bd */
  342.  
  343. static MMIPACKET d019 = {    &_001Message_00bd,
  344.                             &Dialog_tiff,
  345.                             &MJ_MSGL40,
  346.                             OFFSET(MSGL40),
  347.                             0
  348.                         } ;
  349. static MSGL40    d019d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  350.                              246, 157, 294, 175, 0,15, 0,
  351.                             MS_NONEL40,
  352.                             "削除",
  353.                                1,  12,  12,
  354.                             MS_NONEL40,
  355.                               12,   0
  356.                         } ;
  357.  
  358. /* _002Message_00bd */
  359.  
  360. static MMIPACKET d020 = {    &_002Message_00bd,
  361.                             &Dialog_tiff,
  362.                             &MJ_MSGL40,
  363.                             OFFSET(MSGL40),
  364.                             0
  365.                         } ;
  366. static MSGL40    d020d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  367.                              308, 158, 361, 174, 0,15, 0,
  368.                             MS_NONEL40,
  369.                             "複写",
  370.                                1,  12,  12,
  371.                             MS_NONEL40,
  372.                               12,   0
  373.                         } ;
  374.  
  375. /* DButton_00c3 */
  376.  
  377. static MMIPACKET d021 = {    &DButton_00c3,
  378.                             &Dialog_tiff,
  379.                             &MJ_DBUTTONL40,
  380.                             OFFSET(DBUTTONL40),
  381.                             0
  382.                         } ;
  383. static DBUTTONL40    d021d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  384.                               18, 155, 152, 176, 0, 7, 0,
  385.                             MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  386.                             tiff_fail,
  387.                             0x0000
  388.                         } ;
  389.  
  390. /* Message_00c5 */
  391.  
  392. static MMIPACKET d022 = {    &Message_00c5,
  393.                             &Dialog_tiff,
  394.                             &MJ_MSGL40,
  395.                             OFFSET(MSGL40),
  396.                             0
  397.                         } ;
  398. static MSGL40    d022d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  399.                               21, 158, 148, 174, 0,15,13,
  400.                             MS_NONEL40,
  401.                             "画像ファィル読み込み",
  402.                                1,  12,  12,
  403.                             MS_NONEL40,
  404.                                0,   0
  405.                         } ;
  406.  
  407.